//
//  UITabBar-Extension.swift
//  Venus
//
//  Created by qurongxiang on 2018/8/3.
//  Copyright © 2018年 zhaowang. All rights reserved.
//

import UIKit

extension UITabBar {
    
    /// 显示角标  index未完成     带开发  先死
    ///
    /// - Parameter index:
    func showBadgeOnItemIndex(index:Int) {
        hideBadgeOnItemIndex(index: index)
        let label = UILabel(num: 10, point: CGPoint(x: LayoutCommon.width - (LayoutCommon.width / 6) + 3 , y: 17))
        label.tag = 1000
        self.addSubview(label)
    }
    func hideBadgeOnItemIndex(index:Int) {
        self.viewWithTag(1000)?.removeFromSuperview()
    }
}
